<template>
  <div class="indexTop">
    欢迎访问
  </div>

  <div class="indexLeft">
    <router-link to="/menus/list">菜单列表</router-link><br/>
    <router-link to="/users/list">用户列表</router-link><br/>
    <button @click="logout">退出</button>
  </div>
  <div class="indexRight">
    <router-view/>
  </div>


</template>

<script setup>
import {useRouter} from "vue-router";
const router = useRouter()

function logout(){
  localStorage.removeItem('token')
  router.push('/login')
}

</script>

<style scoped>

</style>